The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for providing ganged hardware counters for coordinated rollover and reset operations.
Many modern processors and integrated circuit chips implement hardware counters used for collecting counts of the occurrences of events in the hardware. This information may be used for analyzing performance or debugging problems in a computer system. For example, U.S. Pat. Nos. 5,835,702; 7,340,378; 7,392,370; 7,461,383; and 7,574,587 each describe different types of hardware performance counters used in processor or integrated circuit chip devices for counting the occurrence of events for purposes of performance analysis.
With these hardware based counters, it is often the case that a hardware counter will have a relationship to other hardware counters in the processor or integrated circuit chip. As a result, analysis of a processor or integrated circuit chips' performance may require investigation into the counts recorded in several of these hardware counters. For example, the analysis may involve looking at both a first counter that counts a number of bus events and a second counter that counts a number of retries of bus events. If the number of retries exceeds the number of bus events, then a problem may exist in the performance of the hardware. Thus, in order to determine if such a hardware problem exists, the analysis mechanisms must investigate both the values maintained in both hardware counters.
A problem exists, however, when a hardware counter that has an analytical relationship (in terms of performance analysis; not an actual physically or logically specified relationship) with other hardware counters is reset or rolls-over due to counting more events than a counter's maximum value. That is, a reset or roll-over of one hardware counter does not mean that the other related hardware counters will be similarly reset or rolled-over. Thus, these related hardware counters may continue to count events and as a result may have values that do not correlate to the reset or rolled-over hardware counter.